<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <div class="box-container">
        <div class="item sidebar">1</div>
        <div class="item content">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
        <div class="item">5</div>
        <div class="item item1 header">6</div>
        <div class="item">7</div>
        <div class="item">8</div>
        <div class="item">9</div>
    </div>
    <style>
        .box-container {

            width: 100%;
            height: 80vh;
            background-color: skyblue;

            display: grid;
            /* 固定宽度 */
            /* grid-template-columns: repeat(4, 1fr); */
            grid-template-columns: 100px 200px 100px;
            grid-template-rows: 100px 200px ;
            /* 隐式网格 行 */
            grid-auto-rows:30px; 


            /* 自适应宽度,最大最小值 */
            /* grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); */

            /* 自定义布局 */
            /* grid-template-areas:
                ". . header"
                "sidebar content content"; */

            /* 紧凑 */
            /* grid-auto-flow: row dense; */

            /* 间距 */
            gap: 20px;
            /* grid-column-gap: 100px; */
            /* grid-row-gap: 20px; */


            /* 居中 */
            /* justify-content: space-between;
            align-content: center; */

        }

        .item1 {
            /* 网格线起始 */
            /* grid-row: 1/3;
            grid-column: 1/4;   */
            /* 占位 */
            /* grid-column-start: span 2; */
        }

        .item {
            /* width: 200px; */
            /* height: 200px; */
            border-radius: 10px;
            background-color: cadetblue;
        }

        /* .sidebar {
            grid-area: sidebar;
        }

        .content {
            grid-area: content;
        }

        .header {
            grid-area: header;
        } */
    </style>
</body>

</html>